home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c
- Subject: Re: HELP : getkey
- Date: Tue, 06 Feb 1996 17:53:08 +0200
- Organization: Carelcomp Forest
- Message-ID: <31177964.5B11@cmt.lpr.mail.carel.fi>
- References: <4f74ms$hll@winx03.informatik.uni-wuerzburg.de>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- Martin Lehmann wrote:
- >
- > --
- > Hello !
- >
- > How do I make it to wait for a key pressed on the console (GNU C) ?
- > I tried the following thing (using the CURSES-Libraray):
- >
- > char key;
- >
- > key = getch();
- >
- > This has the disadvantage, that the program is waiting for a key EXCLUSIVELY
- > and nothing else can be done. What I want is to REACT on keys pressed within
- > a bigger loop. I do not want to wait for the user having pressed a key; the
- > program should continue :
- > [rest snipped]
-
- Check out poll (or pollfd). I found it handy in some *nixes, but alas cannot tell if Linux
- contains it. (Or man -k poll.)
-
- Later,
- AriL
- --
- All my opinions are mine and mine alone.
-